<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

	<ui:composition template="/faces/manager/xhtml/templates/template.xhtml">
		<ui:define name="manager-content">
			<table id="manager-content-panel" cellpadding="0" cellspacing="1">
				<tr>
					<td id="manager-content-header">
						<h:form>	
							<p:breadCrumb style="width:810px;">
								<p:menuitem value="#{msg['manager.menu.navigator.home']}"/>
								<p:menuitem ajax="false" value="#{msg['manager.menu.navigator.admin']}" action="/faces/manager/xhtml/main.xhtml"  />
								<p:menuitem value="#{msg['manager.menu.navigator.auditoria']}" />
							</p:breadCrumb>								
						</h:form>
					</td>
				</tr>
				<tr>
					<td id="manager-content-body">
						<h:form>	
							<p:growl id="showMessages" showDetail="true" />
							<p:fieldset legend="#{msg['manager.menu.left.admin.auditoria.title']}" styleClass="manager-fieldset-content">
								<table id="panel-buttons" cellpadding="0" cellspacing="0">
									<tr>
										<td>
											<p:inputText id="searchTerm" value="#{auditoriaController.searchField}" styleClass="inputTextGrid"/>
											<p:watermark for="searchTerm" value="#{msg['manager.menu.left.admin.auditoria.placeholder']}" />
											<p:spacer width="5px"/>
											<p:commandButton value="#{msg['search.menu.button.buscar']}" actionListener="#{auditoriaController.search}" update="auditoria-panel" ajax="true" icon="search-button"/>															
										</td>
									</tr>
								</table>
								<p:spacer height="10px"/>
								<p:outputPanel id="auditoria-panel">
									<p:dataTable 
										var="auditoria" 
										value="#{auditoriaController.lazyModelAuditoria}" 
										rows="#{auditoriaController.pageSize}" 
										paginator="true"										
										emptyMessage="#{msg['messages.list.not.found']}">
										 
										<p:column headerText="#{msg['manager.auditoria.list.grid.column.cliente']}" >
											<h:outputText value="#{auditoria.clienteNome}" />
										</p:column>
										<p:column headerText="#{msg['manager.auditoria.list.grid.column.anuncio']}" >
											<h:outputText value="#{auditoria.anuncioNome}" />
										</p:column>
										<p:column styleClass="view-column-auditoria" headerText="#{msg['manager.auditoria.list.grid.column.site']}" >
											<h:outputText value="#{auditoria.cliquesSite}" />
										</p:column>	
										<p:column styleClass="view-column-auditoria" headerText="#{msg['manager.auditoria.list.grid.column.album']}" >
											<h:outputText value="#{auditoria.cliquesAlbum}" />
										</p:column>		
										<p:column styleClass="view-column-auditoria" headerText="#{msg['manager.auditoria.list.grid.column.telefone']}" >
											<h:outputText value="#{auditoria.cliquesTelefone}" />
										</p:column>									
									
									</p:dataTable>
								</p:outputPanel>							 	
								<p:spacer height="10px"/>								
							</p:fieldset>
						</h:form>
					</td>
				</tr>
			</table>
		</ui:define>
	
	</ui:composition>
</html>